Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Slider): export function for preparing initial value #1637

Merged
merged 5 commits into from
Jun 11, 2024

Conversation

Arucard89
Copy link
Contributor

-small refactor of initial value function
-add prepareSliderInnerState function to export

@Arucard89 Arucard89 added enhancement New feature or request component: Slider labels Jun 10, 2024
@Arucard89 Arucard89 requested review from korvin89 and amje June 10, 2024 16:17
@@ -88,7 +88,7 @@ function createMarks(points: number[]): RcSliderProps['marks'] {
return marks;
}

export function getInnerState({
export function prepareSliderInnerState({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you provide some jsdoc here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, forgot to do it, thanks
143584f

@gravity-ui-bot
Copy link
Contributor

Preview is ready.

@gravity-ui-bot
Copy link
Contributor

Visual Tests Report is ready.

@amje amje changed the title chore(slider): export function for preparing initial value fix(Slider): export function for preparing initial value Jun 10, 2024
@@ -88,7 +88,7 @@ function createMarks(points: number[]): RcSliderProps['marks'] {
return marks;
}

export function getInnerState({
export function prepareSliderInnerState({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why user might needed this function?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why user might needed this function?

I need it to use in RangeSliderPicker component to get inner state. And I don't want to duplicate the code.
Also it could be helpful for other users in the development of components based on the slider.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@amje, I don't know is it really "fix" but not "chore"?
Is it important enough to get into the changelog?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it's important to note this change in the changelog because you have changed the implementation

@Arucard89 Arucard89 merged commit 434949e into main Jun 11, 2024
5 checks passed
@Arucard89 Arucard89 deleted the chore(Slider)-export-init-value-function branch June 11, 2024 13:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component: Slider enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants